class Solution:
  def numWays(self, n: int) -> int:
    if n == 1:
      return 1
    if n == 2:
      return 2
    frog_ls = [1, 1, 2]
    for i in range(3, n + 1):
      frog_ls.append(frog_ls[i-1] + frog_ls[i-2])
    return int(frog_ls[n] % 1000000007)


'''
STATUS: LEARNT
TRIES:  N/A
TIME:   32 MS
MEMORY: 13.8 MB
'''
if __name__ == "__main__":
  solution = Solution()
  print(solution.numWays(2))